<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>
      <span id="h">00</span>
      <span>:</span>
      <span id="m">00</span>
      <span>:</span>
      <span id="s">00</span>
    </div>
    <script>
      setInterval(() => {
        const d = new Date();
        h.innerHTML = d.getHours() < 10 ? "0" + d.getHours() : d.getHours();
        m.innerHTML =
          d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes();
        s.innerHTML =
          d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds();
      }, 1000);
    </script>
  </body>
</html>
